This study uses landslide, fire, and precipitation data to study the antecedent precipitation of post-wildfire landslides. The impact of wildfire on rainfall-triggered landslide susceptibility in a variety of global regions is evaluated through a proxy of normalized precipitation.
Use this section to modify file paths if running the notebook on a different computer.
# Project Directories
data.dir <- file.path('..', '00-data')
raw.data.dir <- file.path(data.dir, 'raw')
processed.data.dir = file.path(data.dir, 'processed')
figure.dir <- file.path('..', '03-figures')
# Landslide data from the NASA Global Landslide Catalog
slide.path <- file.path(raw.data.dir, 'glc', 'GLC20180821.csv')
# Fire data from the MODIS Burned Area dataset
modis.paths <- list.files(path = file.path(data.dir, "processed"),
pattern = 'slide_modisburndate_[ns][ew].csv',
full.names = T)
# Precipitation data from CHIRPS
precip.chirps.ww.path <- file.path(processed.data.dir,
"glc_precip_global.csv")
precip.chirps.ww.monthly.path <- file.path(processed.data.dir,
"glc_precip_global_monthly.csv")
# Additional preciptiation data from Daymet for a limited region
precip.daymet.ca.path <- file.path(processed.data.dir,
"glc_precip_daymet.csv")
Include landslides with the following parameters: * Rainfall triggered
rain.triggers <- c('rain', 'downpour', 'flooding', 'continuous_rain')
start.date <- lubridate::ymd('2007-01-01')
end.date <- lubridate::ymd('2019-01-01')
min.latitude <- -50
max.latitude <- 50
min.location.accuracy <- '10km'
modis.start.date <- lubridate::ymd('20040101')
modis.end.date <- lubridate::ymd('20190101')
wilcox.alternative <- 'less' # n - burned, m - unburned
wilcox.alpha <- 0.05
# Identify if a location is in the global limits
is.in.global.study <- function (x, y) { between(y, min.latitude, max.latitude) }
# Identify if a location is in the CA/NV pilot study
get.data('state.boundaries', tigris::states)
boundaries <- subset(state.boundaries, STUSPS %in% c('CA', 'NV'))
boundaries.df <- fortify(boundaries)
is.in.ca.study <- function (x, y) {
bbox <- sf::st_bbox(subset(state.boundaries, STUSPS == 'CA'))
between(x, bbox$xmin, bbox$xmax) &
between(y, bbox$ymin, bbox$ymax)
}
Seasons are split in the Northern Hemisphere by:
In the southern hemisphere, the split is shifted instead:
A set of functions converts months and days-of-the-year to seasons.
season.breaks <- c('spring'=59, 'summer'=151, 'fall'=243, 'winter'=334)
yday.to.season <- function(yday, latitude) {
if (latitude > 0) {
case_when(
yday > season.breaks['winter'] ~ 'Winter',
yday > season.breaks['fall'] ~ 'Fall',
yday > season.breaks['summer'] ~ 'Summer',
yday > season.breaks['spring'] ~ 'Spring',
TRUE ~ 'Winter')
} else {
case_when(
yday > season.breaks['winter'] ~ 'Summer',
yday > season.breaks['fall'] ~ 'Spring',
yday > season.breaks['summer'] ~ 'Winter',
yday > season.breaks['spring'] ~ 'Fall',
TRUE ~ 'Summer')
}
}
month.to.season <- function (month, north) {
if (north) {
case_when(
month >= 12 ~ 'Winter',
month >= 9 ~ 'Fall',
month >= 6 ~ 'Summer',
month >= 3 ~ 'Spring',
TRUE ~ 'Winter')
} else {
case_when(
month >= 12 ~ 'Summer',
month >= 9 ~ 'Spring',
month >= 6 ~ 'Winter',
month >= 3 ~ 'Fall',
TRUE ~ 'Summer')
}
}
slide.pre.elimination <- readr::read_csv(slide.path)
slide.pre.elimination